<?php
/**
 * Created by PhpStorm.
 * User: qhzhyt
 * Date: 2018/10/19
 * Time: 11:38
 */
session_start();
require_once '../conf/conf.php';
if (!isset($_GET['version'])) {
    echo $lastVersion;
} else {
    $version = $_GET['version'];
    if (version_compare($version, $lastVersion) < 0) {
        echo json_encode(['status' => 1, 'code' => 1, 'data' => ['version' => $lastVersion, 'link' => $downloadLink]]);
        exit(1);
    } else {
        echo json_encode(['status' => 0, 'code' => 0, 'data' => $lastVersion]);
        exit(1);
    }
}